<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue</title>
  <script src="./js/vue.js"></script>
  <style>
    .error {
      color: red;
    }
  </style>
</head>

<body>
  <div id="app">
    <input type="text" v-model="username" v-validate.str="{max:3,msg:'超过限制'}">

  </div>

  <script type="module">
    import './validate/index.js'

    new Vue({
      el: '#app',
      data: {
        username: ''
      }
    })
  </script>
</body>

</html>